package com.sniper.controller;

import com.sniper.model.LineShop;
import com.sniper.service.LineShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author suzhen
 * @create 2018/3/16
 */
@RestController
public class FeignIndexController {

    @Autowired
    LineShopService lineShopService;

    @RequestMapping("hi")
    public String hi() {
        return "111";
    }

    @RequestMapping(value = "/line-shop/get/{id}", method = RequestMethod.GET)
    public LineShop get(@PathVariable String id) {
        return lineShopService.get(id);
    }

    @RequestMapping(value = "/line-shop/list/{id}", method = RequestMethod.GET)
    public List<LineShop> list(@PathVariable String id) {
        return lineShopService.list(id);
    }

}
